package com.zhongfl.crm.enums.boss;

import com.zhongfl.crm.exception.EnumParseException;
import lombok.Getter;

/**
 * OrderMemorandumOrderStatusEnum 备忘录订单跟进状态枚举
 *
 * @author tiantian
 * @date 2018/6/27 22:31
 */
@Getter
public enum OrderMemorandumOrderStatusEnum {
    STATUS_CREATED(2450779L,"创建库"),
    STATUS_COLLECT(2450780L,"采集库"),
    STATUS_DECLARE(2450781L,"申报库"),
    STATUS_APPROVAL(2450782L,"审批库"),
    STATUS_PIDAI(2565085L,"批贷库"),
    WIN(2450783L,"赢单"),
    LOSE(2450784L,"输单"),
    STATUS_STORAGE(2564967L, "进抵库"),
    STATUS_APPLICAT(2564968L, "放款库"),
    STATUS_ACCOUNT(2565058L, "入账库"),
    STATUS_COMPLETED(2450761L, "已完成"),
    STATUS_CANCEL(2565084L, "已取消"),
    OTHER(1000000L,"自动默认");


    private Long lxStageId;
    private String desc;

    OrderMemorandumOrderStatusEnum(Long lxStageId,String desc) {
        this.lxStageId = lxStageId;
        this.desc = desc;
    }

    public static OrderMemorandumOrderStatusEnum valueOf(Long lxStageId) {
        for (OrderMemorandumOrderStatusEnum statusEnum : OrderMemorandumOrderStatusEnum.values()) {
            if (statusEnum.getLxStageId().equals(lxStageId)) {
                return statusEnum;
            }
        }
        throw new EnumParseException(OrderMemorandumOrderStatusEnum.class, String.valueOf(lxStageId));
    }
}
